<!--
 * @Author: your name
 * @Date: 2020-05-05 14:21:01
 * @LastEditTime: 2021-11-19 10:02:01
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \vue_plugins\src\views\test\Index.vue
-->
<template>
<div>
<!-- <FlipCard ref="stack" :pages="list"></FlipCard> -->
<div class="m30">
  <van-button @click="Scan">扫码</van-button>
</div>
</div>
</template>

<script>
export default {
    data(){
        return{
            list:[
              {
                avatar: 'https://i.loli.net/2019/11/23/cnKl1Ykd5rZCVwm.jpg',
                name: '放荡不羁爱自由',
                sex: 'female',
                age: 23,
                starsign: '天秤座',
                distance: '艺术/健身',
                sign: '交个朋友，非诚勿扰'
              },
              {
                avatar: 'https://i.loli.net/2019/11/16/cqyJiYlRwnTeHmj.jpg',
                name: '放荡',
                sex: 'female',
                age: 23,
                starsign: '天秤座',
                distance: '艺术/健身',
                sign: '交个朋友，非诚勿扰'
              },
            ]
        }
    },
    mounted(){
      this.init();
      window.Scan = this.callbackMethodScan;
    },
    methods:{
      init(){
        console.log("this.$el",this.$el.offsetWidth);
      },
      Scan(){
        if(window.BSL){
          BSL.Qcode('0','callbackMethodScan')
        }
      },
      callbackMethodScan(result){
          var val= "回调数据弹出："+result;
		      alert(val);
      }
    }
}
</script>

<style lang="less" scoped>
.m30{
  margin: 30px;
}
</style>